import { tableStateFile } from '@/utils/publicDatas.js';
// 页面的搜索选项
function getSearchOption(key) {
  let option = [];
  switch (key) {
    case 'FirstQC':
    case 'SecondQC':
    case 'ThreeQC':
    case 'NIScoreRecord':
      option = [
        {
          label: '质控日期',
          key: 'qq',
          type: 'date-picker',
          placeholder: '请选择质控日期',
          defaultValue: [],
        },
        {
          label: '质控人员',
          key: 'zkrq',
          type: 'input',
          placeholder: '请输入质控人员',
          defaultValue: '',
        },
        {
          label: '科室',
          key: 'ks',
          type: 'input',
          placeholder: '请输入质控人员',
          defaultValue: '',
        },
        {
          label: '状态',
          key: 'zt',
          type: 'input',
          placeholder: '请输入质控人员',
          defaultValue: '',
        },
        {
          label: '质控表单',
          key: 'bd',
          type: 'input',
          placeholder: '请输入质控人员',
          defaultValue: '',
        },
      ];
      break;

    default:
      break;
  }
  return option;
}
// 页面table项
function getTableOption(key) {
  let option = [];
  switch (key) {
    case 'FirstQC':
    case 'SecondQC':
    case 'ThreeQC':
    case 'NIScoreRecord':
      option = [
        {
          label: '质控日期',
          key: 'rq',
        },
        {
          label: '质控病区',
          key: 'bq',
        },
        {
          label: '质控人员',
          key: 'ry',
        },
        {
          label: '质控表单',
          key: 'bd',
        },
        {
          label: '质控结果',
          key: 'jg',
        },
        {
          label: '得分',
          key: 'df',
        },
        {
          label: '修改事件',
          key: 'sj',
        },
        {
          label: '状态',
          key: 'zt',
          // enum: tableStateFile,
          valueType: 'tag',
          getTag: (rowItem) => {
            return {
              type: tableStateFile(rowItem).type,
              text: tableStateFile(rowItem).text,
            };
          },
        },
        {
          label: '流程节点',
          key: 'lc',
        },
      ];
      break;

    default:
      break;
  }
  return option;
}
export { getSearchOption, getTableOption };
